package com.yaozheng.vocationaltraining.view.userinfo;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

import com.yaozheng.vocationaltraining.R;
import com.yaozheng.vocationaltraining.dialog.interfaces.BaseDialogEventProcess;

import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EViewGroup;

/**
 * 选择性别
 */
@EViewGroup(R.layout.view_dialog_select_sax)
public class SelectSaxDialogView extends LinearLayout {
    BaseDialogEventProcess baseDialogEventProcess;

    public SelectSaxDialogView(Context context) {
        super(context);
    }

    public SelectSaxDialogView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    /**
     * 设置数据响应
     *
     * @param baseDialogEventProcess
     */
    public void setBaseDialogEventProcess(BaseDialogEventProcess baseDialogEventProcess) {
        this.baseDialogEventProcess = baseDialogEventProcess;
    }

    @Click({R.id.cancelText, R.id.womanTextView, R.id.manTextView})
    public void executeTagClick(View view) {
        if (baseDialogEventProcess != null) {
            baseDialogEventProcess.runMethod(String.valueOf(view.getTag()));
        }
    }

}
